home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / www / library / implemen / htassoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.1 KB  |  43 lines

  1. /*                       ASSOCIATION LIST FOR STORING NAME-VALUE PAIRS
  2.                                              
  3.    Lookups from assosiation list are not case-sensitive.
  4.    
  5.  */
  6.  
  7. #ifndef HTASSOC_H
  8. #define HTASSOC_H
  9.  
  10. #include "HTUtils.h"
  11. #include "HTList.h"
  12.  
  13.  
  14. #ifdef SHORT_NAMES
  15. #define HTAL_new        HTAssocList_new
  16. #define HTAL_del        HTAssocList_delete
  17. #define HTAL_add        HTAssocList_add
  18. #define HTAL_lup        HTAssocList_lookup
  19. #endif /*SHORT_NAMES*/
  20.  
  21. typedef HTList HTAssocList;
  22.  
  23. typedef struct {
  24.     char * name;
  25.     char * value;
  26. } HTAssoc;
  27.  
  28.  
  29. PUBLIC HTAssocList *HTAssocList_new NOPARAMS;
  30. PUBLIC void HTAssocList_delete PARAMS((HTAssocList * alist));
  31.  
  32. PUBLIC void HTAssocList_add PARAMS((HTAssocList *       alist,
  33.                                     CONST char *        name,
  34.                                     CONST char *        value));
  35.  
  36. PUBLIC char *HTAssocList_lookup PARAMS((HTAssocList *   alist,
  37.                                         CONST char *    name));
  38.  
  39. #endif /* not HTASSOC_H */
  40. /*
  41.  
  42.    End of file HTAssoc.h.  */
  43.